package com.bci.pwtz.admin.service;

import java.util.List;

import com.bci.pwtz.common.util.PaginationList;
import com.bci.pwtz.exception.PwtzDatabaseException;
import com.bci.pwtz.mysql.model.Dictionary;
import com.bci.pwtz.mysql.model.DictionaryType;

public interface AdminDictionaryService {
	/**查询所有设备类型*/
	public List<DictionaryType> selectDictionaryType()throws PwtzDatabaseException;
    /**查询根目录设备类型*/
	public List<DictionaryType> selectDictionaryTypeByRoot()throws PwtzDatabaseException;
    /**查询子设备类型*/
	public List<DictionaryType> selectDictionaryTypeByParent(Long pid)throws PwtzDatabaseException;
	/**通过设备类型查询字典*/
	public PaginationList<Dictionary> findDictionary(Long pid,
			Long deviceType,Integer status, int pageSize, int pageNo)
			throws PwtzDatabaseException;
	/**
	 * 审核字典
	 * @param status 1、审核通过 2、审核拒绝（物理删除数据）
	 * @return
	 */
	public int approveDictionary(Long id,int status)throws PwtzDatabaseException;
	
	public Dictionary load(Long id) throws PwtzDatabaseException;
	
	public Dictionary add(Dictionary bean) throws PwtzDatabaseException;
	
	public int update(Dictionary bean)  throws PwtzDatabaseException;
	
	public int delete(Long id) throws PwtzDatabaseException;
}
